<?php
namespace Home\Model;
use Think\Model\RelationModel;
/**
 * 店铺的关联模型
 * @author DONGGUIYU
 *
 */
class AttractionModel extends RelationModel
{
    protected $_link = array(
        // 关联店铺类型
        'AttractionType' => array(
            'mapping_type'=> self::BELONGS_TO,
            'class_name'=>'AttractionType',
            'foreign_key'=>'attraction_type_id',
            'mapping_name'=>'attrType',
            'mapping_fields'=>'name',
            'as_fields' => 'name:type_name',
        )
    );
}

?>